﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace PDFDesign.Model
{
    /// <summary>
    /// 表格控件
    /// </summary>
    public class TableControl
    {
        /// <summary>
        /// 距离左边缘距离
        /// </summary>
        [JsonProperty("left")]
        public float Left { get; set; }
        /// <summary>
        /// 距离上边缘距离
        /// </summary>
        [JsonProperty("top")]
        public float Top { get; set; }
        /// <summary>
        /// 表格高度
        /// </summary>
        [JsonProperty("height", NullValueHandling = NullValueHandling.Ignore)]
        public float Height { get; set; }
        /// <summary>
        /// 是否固定行高
        /// </summary>
        [JsonProperty("isFixedRowHeight")]
        public bool IsFixedRowHeight { get; set; }
        /// <summary>
        /// 固定行高
        /// </summary>
        [JsonProperty("fixedRowHeight")]
        public float FixedRowHeight { get; set; }
        /// <summary>
        /// 是否固定行数
        /// </summary>
        [JsonProperty("isFixedRowCount")]
        public bool IsFixedRowCount { get; set; }
        /// <summary>
        /// 固定行数
        /// </summary>
        [JsonProperty("fixedRowCount")]
        public int FixedRowCount { get; set; }
        /// <summary>
        /// 是否渲染空白行
        /// </summary>
        [JsonProperty("renderWhiteRow")]
        public bool RenderWhiteRow { get; set; }
        /// <summary>
        /// 行列表
        /// </summary>
        [JsonProperty("rows")]
        public List<RowControl> Rows { get; set; }
    }
}